<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<style>
<!--

	.produce_introduce{
		max-height;200px;
	}
	
	/* 产品介绍 */
/* 	.produce_introduce .prod_div{
		width:90px; 
		height:110px;
		border:1px solid #fff;
		border-radius:6px;
		float:left;
	}
	.produce_introduce .prod_div:hover{
		border:1px solid #43b9ff;
	}
	.produce_introduce .prod_img{
		width:80px;
		height:80px;
		border:1px solid #ddd;
		border-radius:6px;
		margin:0 auto;
		margin-top:10px;
	}
	.produce_introduce .prod_txt{
		width:80px;
		overflow:hidden;
		text-align:center;
		align:center;
		margin-left:auto;
		margin-right:auto;
	}
	.prod_div{
		max-height:150px;
	} */
 	.produce_introduce .prod_div{
		width:130px; 
		height:160px;
		border:1px solid #ddd;
		border-radius:6px;
		float:left;
		margin-top:10px;
		margin-left:10px;
	}
	.produce_introduce .prod_div:hover{
		border:1px solid #43b9ff;
	}
	.produce_introduce .prod_img{
		width:100px;
		height:100px;
		border:1px solid #ddd;
		border-radius:6px;
		margin:0 auto;
		margin-top:10px;
		margin-left:15px;
	}
	.produce_introduce .prod_txt{
		width:110px;
		overflow:hidden;
		text-align:center;
		align:center;
		margin-left:auto;
		margin-right:auto;
	}
	.prod_div{
		max-height:150px;
	} 
	 
-->
</style>

<script type="text/javascript">
var path='<%=basePath%>';
<!--

	$(function(){
		initProdsProduce();
		initCompanyProduce();
		initHangyeDongTai();/* 初始化行业动态 */
		

		
	})
//-->
/* 初始化 首页 产品介绍  */
function initProdsProduce(){
	$.post(path+"productsAction_list.action",{
		 
	},function(res){
	 	$("#loading").hide();
	 	
		$("#prodmaq").empty();
		
		res=eval('('+res+')');
		for(var i=0;i<res.data.length;i++){
			var e=res.data[i];
			
			var $e=$("<li class='prod_div'><a href='javascript:showDetails(\""+e.uuid+"\")'><img alt='' title='"+e.name+"' src='<%=path%>"+e.imgUrl+"' class='prod_img'><div><div class='prod_txt'>"+e.name+"</div></div></a></li>");
			$("#prodmaq").append($e); 

		}
			$("#prodmaq").imgscroll({
				speed: 40,    //图片滚动速度
				amount: 0,    //图片滚动过渡时间
				width: 1,     //图片滚动步数
				dir: "left"   // "left" 或 "up" 向左或向上滚动
			});
	})
}
/* 初始化首页公司介绍  */
function initCompanyProduce(){
	$.post(path+"introduceAction_details.action",{
		 uuid:1
	 },function(res){
		 	$("#loading").hide();
		 res=eval('('+res+')');
		 if(res.rescode=='100'){
				 $("#div1_introduce").html(res.data.summary);
		 }
	 });
}
/* 初始化首页行业动态  */
function initHangyeDongTai(){
	$.post(path+"newsAction_list.action",{
		rows:4,
		type:2
	},function(result){
	 	$("#loading").hide();
		$("#div1_hangyedongtai").empty();
		result=eval('('+result+')');
		var d=result.data;
		for(var i=0;i<d.length;i++){  
			var e=d[i]; 
			var eid=e.uuid+"";
			<%-- var $e=$('<li nid='+e.uuid+'><img alt="" src="<%=path %>/images/font/prod.png" class="img-circle small_img"><span nid='+e.uuid+' class="li_txt"> '+
					'<a nid='+e.uuid+' href="javascript:showDetails('+e.uuid+')">'+e.name+'<small>（'+e.prodTime+'）</small></a>'+
					'</span><div style="border:1px dashed #ddf;margin:0 auto;"></div></li>'); --%>
			var $e=$("<li><img alt='' src='<%=path%>/images/font/news.png' class='img-circle small_img'> <span class='li_txt'>"+
					"<a href='javascript:showFontNewsDetails(\""+e.uuid+"\")'>"+e.title+"<small>（"+moment(e.newsTime).format('20YY年MMMDo HH:mm')+"）</small></a></span><div style='border:1pxs dashed #ddf;margin:0 auto;'></div></li>");
			$("#div1_hangyedongtai").append($e);
		}
		
	});
}



$.fn.imgscroll = function(o){
	var defaults = {
		speed: 40,
		amount: 0,
		width: 1,
		dir: "left"
	};
	o = $.extend(defaults, o);
	
	return this.each(function(){
		var _li = $("li", this);
		_li.parent().parent().css({overflow: "hidden", position: "relative"}); //div
		_li.parent().css({margin: "0", padding: "0", overflow: "hidden", position: "relative", "list-style": "none"}); //ul
		_li.css({position: "relative", overflow: "hidden"}); //li
		if(o.dir == "left") _li.css({float: "left"});
		
		//初始大小
		var _li_size = 0;
		for(var i=0; i<_li.size(); i++)
			_li_size += o.dir == "left" ? _li.eq(i).outerWidth(true) : _li.eq(i).outerHeight(true);
		
		//循环所需要的元素
		if(o.dir == "left") _li.parent().css({width: (_li_size*3)+"px"});
		_li.parent().empty().append(_li.clone()).append(_li.clone()).append(_li.clone());
		_li = $("li", this);

		//滚动
		var _li_scroll = 0;
		function goto(){
			_li_scroll += o.width;
			if(_li_scroll > _li_size)
			{
				_li_scroll = 0;
				_li.parent().css(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll });
				_li_scroll += o.width;
			}
				_li.parent().animate(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll }, o.amount);
		}
		
		//开始
		var move = setInterval(function(){ goto(); }, o.speed);
		_li.parent().hover(function(){
			clearInterval(move);
		},function(){
			clearInterval(move);
			move = setInterval(function(){ goto(); }, o.speed);
		});
	});
};



</script>

<%--left start --%>	
<div class="data_body_div_company_introduce follow_top30 " >

	<%--produce introduce start --%>
	<div class="container-fluid produce_introduce ">
				<div class="panel panel-default">
					<div class="panel-heading"> 
						<a href="javascript:showEle(2)">
							<span>Produce Introduce</span>
							&nbsp;&nbsp;
							<span class="panel-title">产品介绍</span>
						</a>
					</div>
					<div class="panel-body" style="height:200px;"> 
						
						<!-- <marquee id="prodmaq"  direction="left" behavior="scroll" scrollamount="5" onMouseOut="this.start()" onMouseOver="this.stop()" scrolldelay="0" loop="-1" hspace="10" vspace="10">

						</marquee> -->
						
						<div class="scrollleft" id="prodmaq">
							<ul>
							</ul>
						</div>
												
						
					</div>
					<div class="panel-footer">
						<span class="span_more"><a href="javascript:showEle(2)">MORE >></a></span>
					</div>
					<div style="clear:both;"></div>
				</div>
	</div>
	<%--produce introduce end --%>
	
	<%--company introduce start --%>
	<div class="container-fluid ">
		<div class="row-fluid ">
			<div class="span12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<a href="javascript:showEle(4)">
							<span>About Us</span>
							&nbsp;&nbsp;
							<span class="panel-title">公司简介</span>
						</a>
					</div>
					<div class="panel-body " >
						<span id="div1_introduce">
						</span>
					</div>
					<div class="panel-footer">
						<span class="span_more"><a href="javascript:showEle(4)">MORE >></a></span>
					</div>
				</div>
			</div>
		</div>
	</div>
	<%--company introduce end --%>
	<%--行业动态  start --%>
	<div class="container-fluid ">
		<div class="row-fluid ">
			<div class="span12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<a href="javascript:showEle(3)">
							<span>Competitors' News</span>
							&nbsp;&nbsp;
							<span class="panel-title">行业动态</span>
						</a>
					</div>
					<div class="panel-body " >
						<ul id="div1_hangyedongtai">
						
						</ul>
					</div>
					<div class="panel-footer">
						<span class="span_more"><a href="javascript:showEle(3)">MORE >></a></span>
					</div>
				</div>
			</div>
		</div>
	</div>
	<%--行业动态  end --%>

</div>
<%--left end --%>	

 <jsp:include page="common_right.jsp"></jsp:include> 